﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMSLibrary.TagsCreate.CustomFunction.Inside;

public partial class Show : System.Web.UI.Page
{
    #region 成员
    /// <summary>
    /// 文章详细信息
    /// </summary>
    protected DataEntity.tab_ArticleBase Article = new DataEntity.tab_ArticleBase();
    /// <summary>
    /// 地址参数
    /// </summary>
    string[] paras = { "0" };
    /// <summary>
    /// 文章编号
    /// </summary>
    protected int mid = 0;
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        UIMethod.GetQuery(ref paras, UIMethod.UI_parameters);
        //int a = Convert.ToInt32("a");
        try
        {
            mid = Convert.ToInt32(paras[0]);
        }
        catch { }

        if (!IsPostBack)
        { 
            //获取文章信息
            Article.Select(mid);
            //分页
            CArticleSplitPage csp = new CArticleSplitPage();
            csp.ArticleContent = Article.art_Content;
            csp.SplitType = Article.art_SplitType.Value;
            csp.WordNumber = Article.art_WordNumber.Value;
            Article.art_Content = csp.SplitResult();
            //更新文章点击
            DataEntity.Common.ExecuteNonQuery("update tab_ArticleBase set art_Hits = art_Hits + 1 where art_ID = @art_ID",
                new string[] { "@art_ID" }, new object[] { mid });
        }
    }
}
